home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / compress / zip2zi31.zip / ZIP2ZIPC.BAT < prev    next >
DOS Batch File  |  1993-05-31  |  2KB  |  76 lines

  1. @Echo off
  2. Rem Zip2zipC.Bat (Called by Zip2zipB.Bat)
  3. Rem %1 is starting sub dir; D:\subdir\  (Has Trailing "\")
  4. Rem %2 is %1Z_B\Zip Within orig by ZIP2ZIPB.BAT's Call ZIP2ZIPC %1 %%f
  5. Rem              ..Add/Change -options for Strip/Add Comment File, Logo etc.
  6.  
  7. Echo        Zip2ZipC Executing..Working on %2
  8.  
  9.    Set CNZL=
  10.    IF Exist %1Z_B\CNZL.FLG       Set CNZL=Y
  11.    IF Exist %1Z_B\CNZL.FLG       GoTo Done
  12.  
  13.     IF NOT "%DONE_B%"==""        GoTo End
  14.  
  15.      PKUNZIP %2 -t >Nul
  16.      IF Errorlevel 1  GoTo Error
  17.  
  18.    Call ZIP2-ZNP.BAT %2
  19.    IF "%FSIZE%"==""              GoTo MajorError
  20.     IF "%FSIZE%"=="0"            GoTo UN_ZIP
  21.  
  22.       Set   CNZL=Y
  23.       Echo %CNZL% >%1Z_B\CNZL.FLG
  24.       Echo     %2 Contains a .ZIP file In Path. >>%1ZIP2ZIP.LOG
  25.       Echo     %2 Failed. See ZIP2ZIP.LOG
  26.       GoTo Done
  27.  
  28. :UN_ZIP
  29.    PKunZip  %2  -d -Jhrs %1Z_B\Z_C
  30.    IF Errorlevel 1               GoTo Error
  31.     IF NoT Exist %1Z_B\Z_C\*.ZIP GoTo RE_ZIP
  32.  
  33. Rem ======================================================
  34.   DIR %1Z_B\Z_C\*.ZIP | Find /C " ZIP " >#2DO_C.
  35.   For %%f in (%1Z_B\Z_C\*.ZIP) DO Call ZIP2ZIPD.BAT %1 %%f
  36. Rem ======================================================
  37.   IF "%SAFETY%"=="" GoTo End
  38.    IF Exist %1Z_B\CNZL.FLG      Set CNZL=Y
  39.    IF Exist %1Z_B\CNZL.FLG      GoTo Done
  40.  
  41. :RE_ZIP
  42.    PKZip %2  -k -mrp -ex -Jhrs -wHS  %1Z_B\Z_C\*.*
  43.    IF Errorlevel 1 GoTo Error
  44.    Echo      %2 Converted ok at 2nd level >>%1ZIP2ZIP.LOG
  45.    GoTo Done
  46.  
  47. :MajorError
  48.    Echo Major Logic Error. Do NOT Continue.
  49.    Set   CNZL=Y
  50.    Echo %CNZL% >%1Z_B\CNZL.FLG
  51.    IF "%Safety%"==""   GoTo End
  52.    Echo Cancel With ^C (Control C)...Or...
  53.    Pause
  54.    Set Safety=
  55.    GoTo End
  56.  
  57. :Error
  58.    Echo    %2 Failed...PKZIP or PKUNZIP Encountered an Error in 2nd Lev.>>%1ZIP2ZIP.LOG
  59.    Set   CNZL=Y
  60.    Echo %CNZL% >%1Z_B\CNZL.FLG
  61.  
  62. :Done
  63.    Call ZIP2ZMOP.BAT %1  Z_B  Z_C  %CNZL%
  64.  
  65.    Echo %2 >>#AT_B.
  66.    Type #AT_B. | FIND /C ".ZIP" >#DONE_B.
  67.    Echo N| COMP #2DO_B. #DONE_B. | FIND "OK" >ZIP2-FSZ.
  68.    CALL ZIP2-FSZ.BAT
  69.    IF "%FSIZE%"==""              GoTo MajorError
  70.     IF "%FSIZE%"=="0"            GoTo End
  71.      Set DONE_B=Y
  72.  
  73. :End
  74.    For %%f IN (#2DO_C. #DONE_C. #AT_C.) DO IF Exist %%f Del %%f >Nul
  75.    Set DONE_C=
  76.